//
//  NSDate+Timestamp.swift
//  OneDay
//
//  Created by cheng xi on 2016/9/27.
//  Copyright © 2016年 xicheng. All rights reserved.
//

import UIKit

extension Date {

  
  static func getDateAndWeek()->(month: String,day:String){
    
    let formatter = DateFormatter()
    formatter.dateFormat = "yyyy年MM月_dd E"
    let result = formatter.string(from: Date())
    
    let dateArr =  result.characters.split{$0 == "_"}
    return (String(dateArr[0]),String(dateArr[1]))
  }
  

  static func getDialySignDateAndWeek()->(month: String,day:String){
    
    let formatter = DateFormatter()
    formatter.dateFormat = "yyyy-MM-dd_E"
    let result = formatter.string(from: Date())
    
    let dateArr =  result.characters.split{$0 == "_"}
    return (String(dateArr[0]),String(dateArr[1]))
  }
  
}
